<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Position定位：相对定位</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    .wrap {
      width: 300px;
      height: 300px;
      border: 1px solid #ccc;
    }

    .row {
      width: 100px;
      height: 100px;
      border-radius: 30px;
      line-height: 100px;
      text-align: center;
      color: #fff;
      position: relative;
      /* 相对定位 */
    }

    #row1 {
      background-color: blue;
    }

    #row2 {
      background-color: red;
      left: 150px;
      top: -100px;
    }
  </style>
</head>

<body>
  <div class="wrap">
    <div class="row" id="row1">单元一</div>
    <div class="row" id="row2">单元二</div>
  </div>
</body>

</html>